package src.main.guanchazhe;

import java.util.LinkedList;
import java.util.List;

/**分发实现类*/
public class FaBuImpl implements FaBu{
    private List<Subscribe> list=new LinkedList<>();

    @Override
    public void addSubscribe(Subscribe subscribe) {
        list.add(subscribe);
    }

    @Override
    public void send() {
        System.out.println("发布-》");
        list.forEach(Subscribe::getSubscribe);
    }
}
